package DesignPatern.A15_组合模式.QSB.A04_抽象模式;

/**
 * @Author: Du
 * @Date: 2021/8/2 10:53
 * <p>
 * 叶子节点处理逻辑
 */
public class Leaf extends Component
{
    private int sum = 0;
    
    public Leaf(int sum)
    {
        this.sum = sum;
    }
    
    @Override
    public int Count()
    {
        return sum;
    }
}
